package me.shurufa.utils;

/**
 * 常量
 *
 * @FileName: me.shurufa.utils.Constants.java
 * @author: kHRYSTAL
 * @email: 723526676@qq.com
 * @date: 2016-01-14 18:53
 */
public class Constants {

    public static final int REQ_TIMEOUT = 35000;

    public static final String TencentAppId = ShareConstants.QQ_ID;

    public static final String SinaAppKey = ShareConstants.WB_ID;

    public static final String SinaAppRedirectURI = "https://api.weibo.com/oauth2/default.html";

    public static final String SinaScope = "";

    public static final String WECHAT_KEY = "";

    public static final String BAIDU_KEY = "";

    public static final String SAVE = "save";
    public static final String PUBLISH = "publish";

    public static final String LOGIN_TYPE_LOCAL = "local";
    public static final String LOGIN_TYPE_QQ = "qq";
    public static final String LOGIN_TYPE_WEIBO = "weibo";
    public static final String LOGIN_TYPE_WEIXIN = "weixin";

    // 第三方账号未绑定
    public static final int ACCOUNT_UNBOUND = 10021;

    // 默认请求数据 一次15条
    public static final int PAGE_REQUEST_COUNT = 15;
    public static final String DESC = "DESC";
    public static final String ASC = "ASC";

    public static final int SMS_COUNT_DOWN_TIME = 60;
    public static final int MAX_NAME_LENGTH = 14;

    public static final int DIGEST_TYPE_TEXT = 0;
    public static final int DIGEST_TYPE_IMAGE = 1;
    //    Handler code
    public static final int CODE_TOAST = 97;
    public static final int REQUEST_NOTE_CODE = 98;
    public static final int REQUEST_SKIP_BOOKCONIFG_CODE = 99;
    public static final int REQUEST_CAMERA=101;
    public static final int REQUEST_WRITE = 102;

//    Chat
    public static final int HAS_READ = 1;
    public static final int NOT_READ = 0;
    public static final long BIG_TIME = 4070880000000L;

//    Search Type
    public static final int SEARCH_BY_ISBN = 0;
    public static final int SEARCH_BY_KEYWORD = 1;

//Event ACTION
    //fragment 刷新
    public static final String ACTION_FRAGMENT_REFRESH = "me.shurufa.action_fragment_refresh";
    //微信登陆
    public static final String ACTION_WECHAT_LOGIN = "me.shurufa.action_wechat_login";
    //切换登陆页面fragment
    public static final String ACTION_LOGIN_SWITCH = "me.shurufa.action_login_switch";
    //切换主页面fragment
    public static final String ACTION_MAIN_SWITCH = "me.shurufa.action_main_switch";
    //用户注销
    public static final String ACTION_USER_CHANGE = "me.shurufa.action_user_change";
    //消费积分
    public static final String ACTION_POINTS_CHANGE = "me.shurufa.action_points_change";

    //书架页面刷新
    public static final String ACTION_BOOKSHELVES_REFRESH = "me.shurufa.action_bookshelves_refresh";

    //发现页加载完成
    public static final String ACTION_DISCOVER_REFRESH_COMPLETE= "me.shurufa.action_discover_refresh";

    //打开书架的收藏PopupWindow
    public static final String ACTION_SHELVES_FAVOURITE = "me.shurufa.action_shelves_favourite";

    //BookCommentFragment刷新
    public static final String ACTION_BOOKINFO_COMMENT_REFRESH = "me.shurufa.action_bookinfo_comment_refresh";

    //从书架跳转到图书信息点击添加评价后图书信息界面接收行为
    public static final String ACTION_BOOKINFO_ADD_COMMENT = "me.shurufa.action_bookinfo_add_comment";

    //通知Activity弹出编辑书摘PopupWindow
    public static final String ACTION_EDIT_MY_DIGEST = "me.shurufa.action_edit_my_digest";
    //通知列表替换修改后的数据
    public static final String ACTION_MODIFY_MY_DIGEST = "me.shurufa.action_modify_my_digest";
    //
    public static final String ACTION_WRITE_NOTE = "me.shurufa.action_write_note";
    //通知列表删除书摘
    public static final String ACTION_REMOVE_MY_DIGEST = "me.shurufa.action_remove_my_digest";
    //通知BitmapTransformActivity|BitmapTransformActivity&AddDigestActivity
    //添加书摘成功 finish 通知MainActivity切换到书架页面
    public static final String ACTION_ADD_DIGEST_COMPLETE = "me.shurufa.action_add_digest_complete";
    public static final String ACTION_ADAPTER_NOTIFY = "me.shurufa.action_adapter_notify";

    public static final String ACTION_GO_LOGIN = "me.shurufa.action_go_login";


    // 新增加
    // 点击主界面左侧菜单 切换Fragment
    public static final String ACTION_CHANGE_MENU = "me.shurufa.action_change_menu";

//Intent Extra key
    public static final String EXTRA_CAMERA_PHOTO = "me.shurufa.photo.path";
    public static final String EXTRA_POINTS = "me.shurufa.points";
    public static final String EXTRA_SWITCH_INDEX = "me.shurufa.switch.index";
    public static final String EXTRA_FROM_CAMERA = "me.shurufa.from.camera";
    public static final String EXTRA_SCAN_RESULT = "me.shurufa.scan.result";
    public static final String EXTRA_AVATAR_PATH = "me.shurufa.avatar.path";
    public static final String EXTRA_USER_PARAM = "me.shurufa.user.param";
    public static final String EXTRA_SEARCH_TYPE = "me.shurufa.search.type";
    public static final String EXTRA_SEARCH_ISBN = "me.shurufa.search.isbn";

//    newInstance for Fragment arguments
    public static final String ARG_BOOK_ID = "me.shurufa.argument.bookid";
    public static final String ARG_PARENT_ID = "me.shurufa.argument.parentid"; // 书摘id 或者书评id
    public static final String ARG_PARENT_TYPE = "me.shurufa.argument.parenttype"; // 书摘id 或者书评id
    public static final String ARG_BOOK_TITLE = "me.shurufa.agrument.booktitle";
    public static final String ARG_USER_ID = "me.shurufa.argument.userid";
    public static final String ARG_MENU_ID = "me.shurufa.argument.menuid";
    public static final String ARG_MENU_TITLE = "me.shurufa.argument.menutitle";
    public static final String ARG_BOOK_INFO = "me.shurufa.argument.bookinfo";
    public static final String ARG_FROM_WHERE = "me.shurufa.argument.fromwhere";
    public static final String ARG_EXCERPT_BOOKID = "me.shurufa.argument.excerptbookid";
    public static final String ARG_DIGEST_NOTE = "me.shurufa.argument.digest.note";
    public static final String ARG_SHARE_BEAN_DIGEST = "me.shurufa.argument.share.digest";
    public static final String ARG_SHARE_BEAN_COMMENT = "me.shurufa.argument.share.comment";

    //edit digest
    //发布状态 true为publish false为save
    public static final String ARG_DIGEST_STATE = "me.shurufa.argument.digest.state";
    //书摘内容
    public static final String ARG_DIGEST_CONTENT = "me.shurufa.argument.digest.content";
    public static final String ARG_BOOK = "me.shurufa.argument.book";


//    Event Action
    public static final String EVENT_STAR_BOOK = "me.shurufa.event_star_book";
    public static final String EVENT_MAIN_TO_LOGIN = "me.shurufa.event_main_to_login";
    public static final String EVENT_SHOW_USER_AVATAR = "me.shurufa.event_show_user_avatar";
    public static final String EVENT_SELECT_DIGEST_BOOK = "me.shurufa.event_select_digest_book";

//    Type of Open(from where)
    public static final int TYPE_FROM_USER_DIGEST_ALL = 22;
    public static final int TYPE_FROM_MY_BOOKSHELVES = 23;
    public static final int TYPE_FROM_MY_BOOKINFO = 24;
    public static final int TYPE_FROM_MY_FAVOURITE = 25;
    public static final int TYPE_FROM_INTENT_DETAIL = 26;

    // 2.0新增加的
    /**
     * 随便看看进入到主界面后[此时未登录]  此时需要登录，跳转至登录界面，点击登录后需要finish login界面，并且刷新主界面Login
     */
    public static final int TYPE_FROM_MAIN_TO_LOGIN = 27;

    public static final int TYPE_FROM_MY_COMMENT = 200;
    public static final int TYPE_FROM_MY_BOOK_SHELF = 201;
    public static final int TYPE_FROM_MY_COLLECT = 202;
    public static final int TYPE_FROM_MOST_COMMENT = 203;
    public static final int TYPE_FROM_RECENT_ADD = 203;
    public static final int TYPE_FROM_MOST_DIGEST = 204;
    public static final int TYPE_FROM_ADD_DIGEST_ADD_NOTEBOOK = 205; // 从添加书摘选择书摘本 创建书摘本
    public static final int TYPE_FROM_NOTICE_MESSAGE = 206;          // 从消息中心进入到书摘
    public static final int TYPE_FROM_NOTICE_MESSAGE_DIGEST = 207;   // 从消息中心进入到书摘详情
    public static final int TYPE_FROM_NOTICE_MESSAGE_BOOKCOMMENT = 208;   // 从消息中心进入到书评详情
    public static final int TYPE_FROM_MODIFY_IMAGE_DIGEST = 209;   // 修改图片书摘

    public static final int TYPE_FROM_USER_CENTER_DIGEST = 210;  // 他人个人中心，点击书摘
    public static final int TYPE_FROM_USER_CENTER_COMMENT = 211;  // 他人个人中心，点击书评
    public static final int TYPE_FROM_BOOK_RECENT = 212;   // 最新上架

    // 从用户中心跳到书的详情页 昵称应该不可以点击了，原因是当前界面全是那个人的。
    public static final int FROM_USER_CENTER = 80;
    // 从我的书架，我的评论，我的收藏进去的时候，我的显示成 “显示所有人”
    public static final int FROM_MY_FAVORITE_COMMENT_SHELF = 81;

//    Type of Comment
//    针对书的评论
    public static final int TYPE_COMMENT_BOOK = 90;
//    针对书摘的评论
    public static final int TYPE_COMMENT_DIGEST = 91;

    public static final String ARG_ADD_DIGEST = "me.shurufa.argument.adddigest";
    public static final String ARG_MODIFY_DIGEST = "me.shurufa.argument.modifydigest";
    public static final String EVENT_SEND_BOOK_COMMENT = "me.shurufa.argument.sendbookcomment";
    public static final String EVENT_SEND_COMMENT = "me.shurufa.argument.sendcomment";
    public static final String EVENT_MODIFY_BOOK_COMMENT = "me.shurufa.argument.modifybookcomment";
    public static final Object EVENT_SWITCH_MY_SHELF = "me.shurufa.argument.gomyshelf";
    public static final String EVENT_DEL_BOOK_DIGEST = "me.shurufa.argument.deldigest";
    public static final String EVENT_DEL_BOOK_COMMENT = "me.shurufa.argument.delcomment";
    public static final String EVENT_MODIFY_BOOK_DIGEST = "me.shurufa.argument.modifybookdigest";

    public static final String ARG_SELECT_TAB = "me.shurufa.argument.select_tab";
    public static final String ARG_USER_INFO = "me.shurufa.argument.user_info";
    public static final String ARG_MODIFY_POSITION = "me.shurufa.argument.modifyposition";
    public static final String ARG_COMMENT_ID = "me.shurufa.argument.commentid";
    public static final String ARG_ID = "me.shurufa.argument.niubiid";
    public static final String ARG_COMMENT_CONTENT = "me.shurufa.argument.commentcontent";
    public static final int SINA_SHARE_WAY_TEXT = 1;
    public static final int SINA_SHARE_WAY_PIC = 2;
    public static final int SINA_SHARE_WAY_WEBPAGE = 3;
    public static final int THUMB_SIZE = 120;

    public static final String EVENT_CLICK_SEARCHBOOK_FOR_MAIN = "me.shurufa.search.main";
    public static final String EVENT_REFRESH_DIGEST_LIST = "me.shurufa.refresh_digest_list";
    public static final String EVENT_MAIN_MENU = "me.shurufa.start_menu";
    public static final String EVENT_MAIN_MENU_ADD_DIGEST = "me.shurufa.start_menu.digest";
    public static final String EVENT_MAIN_MENU_ADD_NOTEBOOK = "me.shurufa.start_menu.notebook";
    public static final String EVENT_ADD_NOTEBOOK_FROM_ADD_DIGEST = "me.shurufa.addnotebookfromadddigest";
    public static final String EVENT_CLOSE_INPUT = "me.shurufa.closeinput";

    public static final String EVENT_COMPLETE_ADD_DIGEST = "me.shurufa.completeadddigest";
    public static final String EVENT_CHANGE_IMAGE_DIGEST = "me.shurufa.changedigestimage";
    public static final String THUMB_SUFFIX = "?imageView2/2/w/480/q/85/webp";
    public static final String THUMB_SUFFIX_AVATAR = "?imageView2/2/w/100/q/85/webp";

    public static final String ACTION_AUTH_WEIXIN = "me.shurufa.auth.weixin";
    public static final String ACTION_LOGIN_SUCCESS = "me.shurufa.login.success";


    // 开启新世界 德玛西亚在召唤
    public static final String EVENT_CLICK_SEARCHBOOK_ITEM_DOUBAN = "me.shurufa.searchbook.itemclick";
    public static final String EVENT_CLICK_SEARCHBOOK_ITEM_DOUBAN_ADD_TO_SHELF = "me.shurufa.searchbook.itemclick.addtoshelf";
    public static final String TYPE_FRAGMENT = "type_fragment";   // 首页发现模块 fragment类型
    public static final int TYPE_FRAGMENT_NEWEST_BOOK = 500;      // 最新上架图书
    public static final int TYPE_FRAGMENT_MOST_EXCERPT = 501;     // 最多书摘
    public static final int TYPE_FRAGMENT_MOST_COMMENT = 502;     // 最多书评
    public static final int TYPE_FRAGMENT_RECOMMEND = 503;        // 编辑推荐
    public static final int TYPE_FRAGMENT_MYSHELF= 504;           // 我的书架
    public static final int TYPE_FRAGMENT_MYCOLLECT = 505;        // 我的收藏
    public static final int TYPE_FRAGMENT_MYCOMMENT = 506;        // 我的书评

    public static final int TYPE_COMMENT_EXCERPT = 507; // 书摘的评论
    public static final int TYPE_COMMENT_BOOK_COMMENT = 508; // 书评的评论

    public static final int FROM_MAIN_SEARCH = 509;   // 从主页面搜索
    public static final int FROM_SEARCH = 510;   // 根据ISBN搜索

    public static final int SEARCH_TYPE_LOCAL = 511; // 客户端调豆瓣进行搜索
    public static final int SEARCH_TYPE_SERVER = 512; // 调用服务端进行搜索

}
